<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->


<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->

<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->

<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->

<!DOCTYPE html
  PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
   
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="DC.Type" content="topic">
<meta name="DC.Title" content="Sybase Database">
<meta name="product" content="">
<meta name="DC.Relation" scheme="URI" content="en-us_topic_0000001839267033.html">
<meta name="prodname" content="">
<meta name="version" content="">
<meta name="brand" content="30-OceanProtect Appliance 1.5.0-1.6.0 Help Center">
<meta name="DC.Publisher" content="20240608">
<meta name="DC.Format" content="XHTML">
<meta name="DC.Identifier" content="EN-US_TOPIC_0000001839266957">
<meta name="DC.Language" content="en-us">
<link rel="stylesheet" type="text/css" href="public_sys-resources/commonltr.css">
<title>Sybase Database</title>
</head>
<body style="clear:both; padding-left:10px; padding-top:5px; padding-right:5px; padding-bottom:5px"><a name="EN-US_TOPIC_0000001839266957"></a><a name="EN-US_TOPIC_0000001839266957"></a>

<h1 class="topictitle1">Sybase Database</h1>
<div><div class="section" id="EN-US_TOPIC_0000001839266957__section4543102195920"><a name="EN-US_TOPIC_0000001839266957__section4543102195920"></a><a name="section4543102195920"></a><h4 class="sectiontitle">pre-freeze-script Script</h4><p>The script content is as follows:</p>
<p>In the script, <strong>sybasebd1</strong> and <strong>sybasebd2</strong> are database names. A maximum of eight databases can be locked at a time.</p>
<pre class="screen">#!/bin/sh
SYBASEHOME=<em><strong>Installation path of the Sybase database</strong></em>
FREEZEFILE=$SYBASEHOME"/scripts/pre-freeze-script.sql"
FREEZELOG=$SYBASEHOME"/scripts/pre-freeze-script.out"
if [ "$(id -u)" -eq "0" ]; then 
    [ -f ${FREEZEFILE} ] &amp;&amp; rm -f ${FREEZEFILE}
    [ -f ${FREEZELOG} ] &amp;&amp; rm -f ${FREEZELOG}
 
    echo "${SYBASEHOME}/OCS-15_0/bin/isql -SKPNSYBASE -U <em><strong>Database user name</strong></em> -P <em><strong>Password</strong></em> -e -n -o ${FREEZELOG} &lt;&lt;EOF" &gt; ${FREEZEFILE}
    echo "quiesce database <strong><em>Customized lock tag, such as tag1</em></strong> hold <strong><em>sybasebd1</em></strong>,<strong><em>sybasebd2</em></strong>" &gt;&gt; ${FREEZEFILE}
    echo "go" &gt;&gt; ${FREEZEFILE}
    echo "EOF;" &gt;&gt; ${FREEZEFILE}
 
    exec su sybase -c  ${FREEZEFILE}
    [ -f ${FREEZEFILE} ] &amp;&amp; rm -f ${FREEZEFILE}
fi</pre>
</div>
<div class="section" id="EN-US_TOPIC_0000001839266957__section655719346595"><a name="EN-US_TOPIC_0000001839266957__section655719346595"></a><a name="section655719346595"></a><h4 class="sectiontitle">post-thaw-script Script</h4><p>The script content is as follows:</p>
<p>In the script, <strong>sybasebd1</strong> and <strong>sybasebd2</strong> are database names. A maximum of eight databases can be locked at a time.</p>
<p><strong>tag1</strong> is a lock tag, which is the same as the lock tag defined in the <strong>pre-freeze-script</strong> script.</p>
<pre class="screen">#!/bin/sh
SYBASEHOME=<em><strong>Installation path of the Sybase database</strong></em>
UNFREEZEFILE=$SYBASEHOME"/scripts/post-thaw-script.sql"
UNFREEZELOG=$SYBASEHOME"/scripts/post-thaw-script.out"
if [ "$(id -u)" -eq "0" ]; then 
    [ -f ${UNFREEZEFILE} ] &amp;&amp; rm -f ${UNFREEZEFILE}
    [ -f ${UNFREEZELOG} ] &amp;&amp; rm -f ${UNFREEZELOG}
 
    echo "${SYBASEHOME}/OCS-15_0/bin/isql -SKPNSYBASE -U <em><strong>Database user name</strong></em> -P <em><strong>Password</strong></em> -e -n -o ${UNFREEZELOG} &lt;&lt;EOF" &gt; ${UNFREEZEFILE}
    echo "quiesce database <strong><em>tag1</em></strong> release" &gt;&gt; ${UNFREEZEFILE}
    echo "go" &gt;&gt; ${UNFREEZEFILE}
    echo "EOF;" &gt;&gt; ${UNFREEZEFILE}
 
    exec su sybase -c ${UNFREEZEFILE}
    [ -f ${UNFREEZEFILE} ] &amp;&amp; rm -f ${UNFREEZEFILE}
fi</pre>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="en-us_topic_0000001839267033.html">Step 3: Configuring the Application-Consistent Backup Script</a></div>
</div>
</div>

<div class="hrcopyright"><hr size="2"></div><div class="hwcopyright">Copyright &copy; Huawei Technologies Co., Ltd.</div></body>
</html>